package com.zhuang.designpattern.flyweight;

import com.alibaba.fastjson.JSON;
import com.zhuang.designpattern.flyweight.util.Activity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * description: Test
 * date: 2022/9/18 20:00
 * author: Zhuang
 * version: 1.0
 */
public class Test {
    public static void main(String[] args) throws InterruptedException {
        Logger logger = LoggerFactory.getLogger(Test.class);

        ActivityController activityController = new ActivityController();

        for (int index = 0; index < 10; index++) {
            Long req=1001L;
            Activity activity = activityController.queryActivityInfo(req);
            logger.info("测试结果：{} {}",req, JSON.toJSONString(activity));
            Thread.sleep(1000);
        }
    }
}
